{extend name="common/base"/}
<!-- 主体 -->
{block name="body"}
	<form class="layui-form p-4">
		<h3 class="pb-3">新建会员升级记录</h3>
		<table class="layui-table layui-table-form">
			<tr><td class="layui-td-gray-2">用户ID<font>*</font></td>
			<td><input type="text" name="uid"  lay-verify="required" lay-reqText="请完善用户ID" value="" autocomplete="off" placeholder="请输入用户ID" class="layui-input"></td><td class="layui-td-gray-2">会员等级<font>*</font></td>
			<td><input type="text" name="level"  lay-verify="required" lay-reqText="请完善会员等级" value="" autocomplete="off" placeholder="请输入会员等级" class="layui-input"></td><td class="layui-td-gray-2">升级金额<font>*</font></td>
			<td><input type="text" name="level_money"  lay-verify="required" lay-reqText="请完善升级金额" value="" autocomplete="off" placeholder="请输入升级金额" class="layui-input"></td>
		</tr>
				<tr><td class="layui-td-gray-2">累计消费金额<font>*</font></td>
			<td><input type="text" name="money"  lay-verify="required" lay-reqText="请完善累计消费金额" value="" autocomplete="off" placeholder="请输入累计消费金额" class="layui-input"></td><td class="layui-td-gray-2">创建时间</td>
			<td><input type="text" name="create_time"  value="" autocomplete="off" placeholder="请输入创建时间" class="layui-input"></td><td class="layui-td-gray-2">更新时间</td>
			<td><input type="text" name="update_time"  value="" autocomplete="off" placeholder="请输入更新时间" class="layui-input"></td>
		</tr>
				
		</table>
		<div class="pt-3">
			<input type="hidden" name="id" value="0"/>
			<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
			<button type="reset" class="layui-btn layui-btn-primary">重置</button>
		</div>
	</form>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
	<script>
		var moduleInit = ['tool'];

			function gouguInit() {
			var form = layui.form, tool = layui.tool;
			var layer = layui.layer;
			var element = layui.element;
			
			
			
			//监听提交
			form.on('submit(webform)', function (data) {
			
			let callback = function (e) {
			layer.msg(e.msg);
			if (e.code == 0) {
			tool.sideClose(1000);
		}
		}
			tool.post("/admin/user_level_log/add", data.field, callback);
			return false;
		});
		}

	</script>
{/block}
<!-- /脚本 -->